public class Bank {

        private static int money;
        public int getMoney(){
            return money;
        }
        public void saveMoney(int m){
            synchronized (this) {
                System.out.println("加分后的总分数："+(money+=m));
            }
        }
        public void drawMoney(int m){
            synchronized (this) {
                Bank bank = new Bank();
                if (bank.getMoney()<=0) {
                    System.out.println("加分失败，分数剩余为0");
                }else {
                    System.out.println("扣分后的总分数："+(money-=m));
                }
            }
        }

        public static void main(String[] args) {
            Mans m1 = new Mans();
            Womens w = new Womens();
            Thread t1 = new Thread(m1);
            Thread t2 = new Thread(m1);
            Thread t3 = new Thread(m1);
            Thread t4 = new Thread(w);
            Thread t5 = new Thread(w);
            Thread t6 = new Thread(w);
            t1.start();
            t2.start();
            t3.start();
            t4.start();
            t5.start();
            t6.start();
        }

    }

